package com.depot.sys.web;

import com.base.LoginUser;
import com.opensymphony.xwork2.ModelDriven;
import com.soar.BaseActionSupport;
import com.soar.context.Environment;
import com.soar.senv.SoarProperties;

/**
 * 
 * @author zhangaoxiang
 * @version $Revision$ - $Author$ at $Date$
 * @description com.itaskstar.sys.web.DashboardAction
 */
public class DashboardAction extends BaseActionSupport implements ModelDriven<LoginUser>
{
	private static final long serialVersionUID = 1L;

	public LoginUser domain = new LoginUser();

	public String execute(Environment env) throws Exception
	{

		if (env.getSession().getAttribute(SoarProperties.SOAR_BM_LOGINUSER_SESSION_ID) != null)
		{
			return "dashboard";
		}
		else
		{
			return "login";
		}
	}

	public LoginUser getModel()
	{
		return this.domain;
	}

}
